﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity.ModelConfiguration;

namespace EzyGoEzySystem.Models
{
    public class StraightLineDistanceConfig : EntityTypeConfiguration<StraightLineDistance>
    {
        internal StraightLineDistanceConfig()
        {
            this.HasRequired(route => route.StartBusStop)
                .WithMany()
                .HasForeignKey(route => route.StartBusStopID);

            this.HasRequired(route => route.EndBusStop)
               .WithMany()
               .HasForeignKey(route => route.EndBusStopID)
               .WillCascadeOnDelete(false);
        }
    }
}